//
//  OBaseLogic.m
//  soccer
//
//  Created by 上官千城 on 15/9/18.
//  Copyright (c) 2015年 上官千城. All rights reserved.
//

#import "OBaseLogic.h"

@implementation OBaseLogic


-(instancetype)initWithName:(NSString *)name muDelegate:(id<OMultipleLogicRun>)muDelegate
{
    self = [super init];
    if (self) {
        _url = [NSString stringWithFormat:@"http://%@:%d/OServer/%@", HOST, PORT,name];
        _muDelegate = muDelegate;
        return self;
    }
    return nil;
}

/*
-(instancetype) initWithName:(NSString *)name
{
    self = [super init];
    if (self) {
        _url = [NSString stringWithFormat:@"http://%@:%d/OServer/%@", HOST, PORT,name];
        //_muDelegate = muDelegate;
        return self;
    }
    return nil;
    return nil;
}*/

-(void) send:(NSDictionary *)params
{
    OHttp *onet = [[OHttp alloc] initWithMethod:@"GET" url:_url params:params reqData:nil];
    
    [onet asynSend:self];
}


-(void)mu
{
    if (_muDelegate) {
        [_muDelegate muRun:self];
    }
}
 

@end
